package com.web.base.open.message;

import com.blue.core.dict.State;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 开放平台帐号请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2017年02月27日
 */
 public class AccountRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class }, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id;
	@NotBlank(groups = { SaveModel.class }, message = "用户名不能为空")
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "用户名长度[0-20]")
	private String name;
	@NotBlank(groups = { SaveModel.class }, message = "密钥不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "密钥长度[0-50]")
	private String secret;
	@NotBlank(groups = { SaveModel.class }, message = "描述不能为空")
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "描述长度[0-200]")
	private String descp;
	private Date createTime;
	private State state;
	
	public AccountRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getSecret()
	{
		return this.secret;
	}
	
	public void setSecret(String secret)
	{
		this.secret = secret;
	}
	
	public String getDescp()
	{
		return this.descp;
	}
	
	public void setDescp(String descp)
	{
		this.descp = descp;
	}
	
	public Date getCreateTime()
	{
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}
	
	public State getState()
	{
		return this.state;
	}
	
	public void setState(State state)
	{
		this.state = state;
	}
	
}
